home *** CD-ROM | disk | FTP | other *** search
/ Macwelt 1 / Macwelt DVD 1.toast / Web-Publishing / HTML-Editoren / CreaText 1.4.4 ƒ / CreaText Help / docs / javascript < prev    next >
Encoding:
Text File  |  2001-10-04  |  2.5 KB  |  37 lines

  1. <HTML>
  2.  
  3.     <HEAD><TITLE>Javascript</TITLE>
  4.     <META name="Description" content="This page shows how to use CreaText's JavaScript dialog">
  5.     <META name="Keywords" content="JavaScript, Java Script, script, js">
  6.     </HEAD>
  7.     <BODY bgcolor="white">
  8.  
  9. <FONT face="Charcoal" size="6">
  10. JavaScript
  11. </FONT>
  12. <P></P>
  13.  
  14. <BR> <BR>
  15. Unfortunately, CreaText lacks direct JavaScript syntax coloring support in the main window. But it offers a separate dialog in which you can more comfortably edit scripts.<BR>
  16. You can reach it by choosing Insert > JavaScript > Script... or press Command-Option-J on your keyboard.
  17.  
  18.  
  19. <BR> <BR>
  20.  
  21. <FONT color="#330099" face="Chicago" size="3">
  22. Writing scripts
  23. </FONT><BR>
  24. The JavaScript dialog features a usual text field like the main window. Here you enter all your code.<BR>
  25. The advantage of using the JavaScript dialog is that it supports syntax coloring, auto indent and bracket matching.<BR>
  26. The syntax coloring mean that syntax words, like "var", are colored so you can easily determine if any word is a syntax word or normal text. The colors used for the syntax are the same that are used for Tags in the main window. This means you can change them in the <A href="prefs" target="_self">Preferences</A> dialog. Note: The syntax coloring is not perfect, that means that often, words which are followed by a period (.) are not colored. I hope to be able to fix this in a future release.<BR>
  27. Auto indent is the same feature as in the main window. If you write some text in a line, and want to make it more readable, you first add some spaces or tabs and then enter the code. If you press Enter on your keyboard to go to the next line, CreaText recognizes this leading spaces and tabs and takes them to the next line.<BR>
  28. Bracket matching means that if you enter an opening bracket -(, [, or {- and later enter the corresponding closing bracket -), ], }- the opening bracket flashes for a short period so you get the visual feedback that this bracket closes what the other bracket opened (so to say). Note: Currently, CreaText doesn't really recognize which closing bracket is according to which opening bracket, so there will be errors. Again, I hope to fix this in a future release.<BR>
  29. If you have finished your script you can press the 'Insert' button so CreaText will place the script in the <<FONT color="blue">HEAD</FONT>> of the current document. You can also choose to save the script as an external file by pressing the 'Save as external' button and choosing a name and location of the file to be created.
  30.  
  31.  
  32.  
  33.  
  34. <!-- Freak on a leash -->
  35.  
  36.      </BODY>
  37. </HTML>